﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace PRE.Report_Catalog
{
    public partial class Frm_Thongke_Hocvien : DevExpress.XtraEditors.XtraForm
    {
        DAL.EntitesDAL.KhoahocDAL _dal = new DAL.EntitesDAL.KhoahocDAL();
        DAL.EntitesDAL.HocvienDAL _dal1 = new DAL.EntitesDAL.HocvienDAL();

        public Frm_Thongke_Hocvien()
        {
            InitializeComponent();
        }

        private void Frm_Thongke_Hocvien_Load(object sender, EventArgs e)
        {
            cboKhoahoc.Properties.DataSource = _dal.Select();

            DataTable _dtb = _dal1.Select();
            if (_dtb != null)
                grcMain.DataSource = _dtb;

        }

        private void cboKhoahoc_EditValueChanged(object sender, EventArgs e)
        {
            string _makhoa = cboKhoahoc.EditValue + "";
            DataTable _dtb = _dal1.Select_TK_HV(_makhoa); 
            if (_dtb != null)
                grcMain.DataSource = _dtb;

        }

    }
}